.home-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* 背景图与遮罩 */
.home-bg {
  position: absolute ;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.home-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(18, 18, 18, 0.1);
}

.user-message{
  width: 600px;
  min-height: 500px;
  background-color: white;
  z-index: 1;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 30px;
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  overflow-y: auto;
}

/* 用户信息样式 */
.user-profile h2 {
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
  margin-top: 0;
}

.profile-header {
  display: flex;
  align-items: center;
  margin: 30px 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #3498db;
}

.profile-name-container {
  margin-left: 20px;
}

.profile-name {
  font-size: 24px;
  margin: 0 0 10px 0;
  color: #2c3e50;
}

.profile-membership {
  color: #7f8c8d;
  margin: 0;
  font-style: italic;
}

.profile-details {
  margin: 30px 0;
  line-height: 1.8;
  color: #34495e;
}

.edit-profile-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.edit-profile-btn:hover {
  background-color: #2980b9;
}

/* 注册表单样式 */
.registration-form h2 {
  color: #2c3e50;
  text-align: center;
  margin-top: 0;
}

.registration-description {
  text-align: center;
  color: #7f8c8d;
  margin-bottom: 30px;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #2c3e50;
  font-weight: 500;
}

.form-group input {
  padding: 12px;
  border: 1px solid #bdc3c7;
  border-radius: 5px;
  font-size: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.register-btn {
  background-color: #1e88e5;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 10px;
}

.register-btn:hover {
  background-color: blue;
}

.error-message {
  color: #e74c3c;
  text-align: center;
  margin-top: 20px;
}
/* 原有样式保留，新增/补充以下编辑相关样式 */

/* 1. 个人信息区域：标题+编辑按钮横向排列 */
.profile-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee; /* 分隔线增强视觉层次 */
}

/* 2. 编辑按钮完整样式 */
.edit-profile-btn {
  padding: 8px 16px;
  background-color: #4096ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

/* 编辑按钮 hover 效果 */
.edit-profile-btn:hover {
  background-color: #1890ff; /* 加深蓝色，增强交互反馈 */
}

/* 编辑按钮禁用状态（加载时） */
.edit-profile-btn:disabled {
  background-color: #a0cfff; /* 浅灰色，提示不可点击 */
  cursor: not-allowed;
  opacity: 0.8;
}

/* 3. 编辑模式表单：按钮组（提交+取消）横向排列 */
.form-btn-group {
  display: flex;
  gap: 12px; /* 按钮间距，避免拥挤 */
  margin-top: 20px;
}

/* 4. 取消按钮样式（与提交按钮区分） */
.cancel-btn {
  padding: 8px 16px;
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

/* 取消按钮 hover 效果 */
.cancel-btn:hover {
  background-color: #eee;
  border-color: #ccc;
}

/* 取消按钮禁用状态（加载时） */
.cancel-btn:disabled {
  background-color: #fafafa;
  color: #bbb;
  border-color: #eee;
  cursor: not-allowed;
}

/* 5. 编辑模式表单标题调整 */
.registration-form h2 {
  color: #333;
  font-size: 18px;
  margin-bottom: 16px;
  text-align: center;
}

/* 6. 个人信息详情区域：优化排版 */
.profile-details {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px; /* 信息行间距，提升可读性 */
}

.profile-details p {
  font-size: 14px;
  color: #555;
  margin: 0;
}

.profile-details strong {
  color: #333;
  margin-right: 8px;
}

/* 7. 头像+姓名区域：优化对齐 */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px; /* 头像与文字间距 */
}

/* 头像样式微调 */
.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%; /* 圆形头像，符合常见设计 */
  object-fit: cover;
  border: 2px solid #f0f0f0; /* 边框增强立体感 */
}

/* 姓名容器文字排版 */
.profile-name-container {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 18px;
  color: #333;
  margin: 0 0 4px 0;
}

.profile-membership {
  font-size: 12px;
  color: #888;
  margin: 0;
}

/* 8. 动画效果：编辑/查看模式切换过渡 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px); /* 轻微下移入场，更自然 */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}